# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=arpantispoofer
pkgver=1.0.1.32
pkgrel=5
pkgdesc='A utility to detect and resist BIDIRECTIONAL ARP spoofing.'
groups=('blackarch' 'blackarch-defensive' 'blackarch-networking')
arch=('x86_64' 'aarch64')
url='http://arpantispoofer.sourceforge.net/'
license=('GPL')
depends=('libgnomeui' 'gtk2' 'libnotify' 'libbonoboui')
source=("http://downloads.sourceforge.net/project/arpantispoofer/linux-src/$pkgname-linux-$pkgver.tar.bz2")
sha512sums=('91723e59f3eac0095752aa5231d474c2641f069337848969296a49131768612baf2ff1692329a5aaee49c07f478b029bd9d35affa9d7db4dbcb2784dec64f33d')

prepare() {
  #sed -i 's|gdk/gdk.h|gtk-1.2/&|' linux-ui/entry.cpp

  sed -i 's|sbindir ?= $(prefix)/sbin|sbindir ?= $(prefix)/bin|' Makefile
  sed -i \
    "/^CPPARGS/s|= |= $CFLAGS -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/glib-1.2 -I/usr/lib/glib/include |" Makefile
}

build() {
  make
}

package() {
  make DESTDIR="$pkgdir" install

  rmdir "$pkgdir/usr/sbin"
}

